package com.itheima.ood.inner.demo06;

public class SwimmingDemo {

    public static void main(String[] args) {

        SwimmingImplement swimmingImplement = new SwimmingImplement();
        goSwimming(swimmingImplement);

        goSwimming(new Swimming() {
            @Override
            public void swimming() {

                System.out.println("swimming..........2........");
            }
        });
    }

    public static void goSwimming(Swimming swimming){

        swimming.swimming();
    }
}
